import request from '@/utils/request'

export function login(username, password,appCode) {
  return request({
    url: '/admin/login',
    method: 'post',
    data: {
      username,
      password,
      appCode,
    }
  })
}

export function getInfo() {
  return request({
    url: '/admin/info',
    method: 'get',
  })
}

export function logout() {
  return request({
    url: '/admin/logout',
    method: 'post'
  })
}

// 获取路由
export const getRouters = () => {
  return request({
    url: '/admin/getRouters',
    method: 'get'
  })
}